<?php

	//ERROR CHECK for new file consumer entry
if(isset($_POST['submitted'])) {
	/*
	use the lines below for email verificaiton
	if($_POST['emailTo'] == '') {
		$emailToError = 'You forgot to enter the email address to send to.';
	} else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", $_POST['emailTo'])) {
		$emailToError = 'Enter a valid email address to send to.';
	}
	if($_POST['emailFrom'] == '') {
		$emailFromError = 'You forgot to enter the email address to send from.';
	} else if (!eregi("^[A-Z0-9._%-]+@[A-Z0-9._%-]+\.[A-Z]{2,4}$", $_POST['emailFrom'])) {
		$emailFromError = 'Enter a valid email address to send from.';
	}
	*/
	
	if($_POST['fName'] == '') {
		$fNameError = 'You forgot to enter a first name.';
	}
	if($_POST['lName'] == '') {
		$lNameError = 'You forgot to enter a last name.';
	}
	//we have everything we need, so run the script.  there were no errors
	if(!isset($fNameError) && !isset($lNameError)) {
		include('./actions/ProcessConsumerUpdate.php');
		//include('./enterdb.php');
		//include('./thanks.php');
	}
}
?>